home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Tools - Objects / C++ / MPW C++ 3.1b1 / Examples / CPlusExamples / CPlusTESample.make < prev    next >
Text File  |  1989-09-29  |  4KB  |  144 lines

  1. #------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Simple TextEdit Sample Application
  6. #
  7. #    CPlusTESample
  8. #
  9. #    This file: CPlusTESample.make    -    Make source
  10. #
  11. #    Copyright © 1989 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:    
  15. #            1.0                     03/89
  16. #
  17. #    Components:
  18. #            CPlusTESample.make        March 1, 1989
  19. #            TApplicationCommon.h    March 1, 1989
  20. #            TApplication.h            March 1, 1989
  21. #            TDocument.h                March 1, 1989
  22. #            TECommon.h                March 1, 1989
  23. #            TESample.h                March 1, 1989
  24. #            TEDocument.h            March 1, 1989
  25. #            TApplication.cp            March 1, 1989
  26. #            TDocument.cp            March 1, 1989
  27. #            TESample.cp                March 1, 1989
  28. #            TEDocument.cp            March 1, 1989
  29. #            TESample.a                March 1, 1989
  30. #            TApplication.r            March 1, 1989
  31. #            TESample.r                March 1, 1989
  32. #
  33. #   This version of TESample has been substantially
  34. #   reworked in C++ to show how a "typical" object oriented
  35. #   program could be written. To this end, what was once a
  36. #   single source code file has been restructured into a
  37. #   set of classes which demonstrate the advantages of
  38. #   object-oriented programming. 
  39. #   
  40. #   There are four main classes in this program. Each of
  41. #   these classes has a definition (.h) file and an
  42. #   implementation (.cp) file.  
  43. #   
  44. #   The TApplication class does all of the basic event
  45. #   handling and initialization necessary for Mac Toolbox
  46. #   applications. It maintains a list of TDocument objects,
  47. #   and passes events to the correct TDocument class when
  48. #   apropriate. 
  49. #   
  50. #   The TDocument class does all of the basic document
  51. #   handling work. TDocuments are objects that are
  52. #   associated with a window. Methods are provided to deal
  53. #   with update, activate, mouse-click, key down, and other
  54. #   events. Some additional classes which implement a
  55. #   linked list of TDocument objects are provided. 
  56. #   
  57. #   The TApplication and TDocument classes together define
  58. #   a basic framework for Mac applications, without having
  59. #   any specific knowledge about the type of data being
  60. #   displayed by the application's documents. They are a
  61. #   (very) crude implementation of the MacApp application
  62. #   model, without the sophisticated view heirarchies or
  63. #   any real error handling. 
  64. #   
  65. #   The TESample class is a subclass of TApplication. It
  66. #   overrides several TApplication methods, including those
  67. #   for handling menu commands and cursor adjustment, and
  68. #   it does some necessary initialization. Note that we
  69. #   only need to override 
  70. #   
  71. #   The TEDocument class is a subclass of TDocument. This
  72. #   class contains most of the special purpose code for
  73. #   text editing. In addition to overriding most of the
  74. #   TDocument methods, it defines a number of additional
  75. #   methods which are used by the TESample class to get
  76. #   information on the document state.  
  77. #
  78. #------------------------------------------------------------------------------
  79.  
  80. # We need this rule since it is not built into MPW 3.0 Make
  81. .cp.o    ƒ    .cp
  82.     CPlus {depDir}{default}.cp -o {targDir}{default}.cp.o {CPlusOptions}
  83.  
  84. AppLibObjs =    ∂
  85.     TApplication.cp.o ∂
  86.     TDocument.cp.o
  87.  
  88. AppLibSrcs =    ∂
  89.     TApplication.cp ∂
  90.     TDocument.cp
  91.  
  92. AppLibHdrs =    ∂
  93.     TApplicationCommon.h ∂
  94.     TApplication.h ∂
  95.     TDocument.h
  96.  
  97. Objs =    ∂
  98.     TEDocument.cp.o ∂
  99.     TESample.cp.o ∂
  100.     TESampleGlue.a.o
  101.  
  102. Srcs =    ∂
  103.     TEDocument.cp ∂
  104.     TESample.cp ∂
  105.     TESampleGlue.a
  106.  
  107. Hdrs =    ∂
  108.     TECommon.h ∂
  109.     TEDocument.h ∂
  110.     TESample.h
  111.  
  112. # turn on SADE symbols
  113. SymOpts = -sym off
  114.  
  115. # C++ options
  116. CPlusOptions = {SymOpts}
  117.  
  118. CPlusTESample ƒƒ {Objs} CPlusAppLib.o CPlusTESample.make
  119.     Link -d -o {Targ} {SymOpts} ∂
  120.         {Objs} ∂
  121.         CPlusAppLib.o ∂
  122.         "{CLibraries}"CPlusLib.o ∂
  123.         "{CLibraries}"CRuntime.o ∂
  124.         "{CLibraries}"StdCLib.o ∂
  125.         "{CLibraries}"CInterface.o ∂
  126.         "{Libraries}"Interface.o
  127.     SetFile {Targ} -t APPL -c 'MOOT' -a B
  128.  
  129. CPlusTESample ƒƒ TESample.r TECommon.h CPlusTESample.make
  130.     Rez -append -o {Targ} TESample.r
  131.  
  132. CPlusTESample ƒƒ TApplication.r TApplicationCommon.h CPlusTESample.make
  133.     Rez -append -o {Targ} TApplication.r
  134.  
  135. # if ANY headers change, recompile everything
  136. {Objs} ƒƒ {Hdrs} {AppLibHdrs}
  137.  
  138. CPlusAppLib.o ƒƒ {AppLibObjs} CPlusTESample.make  
  139.     Lib -o {Targ} {SymOpts} {AppLibObjs}
  140.  
  141. # if AppLib headers change, recompile AppLib Objects
  142. {AppLibObjs} ƒƒ {AppLibHdrs}
  143.  
  144.